<script>
if (window == top)top.location.href = "";
function checkform(){
	var email=$("input[name='email']").val();
	if(!checkEmail(email)){
		GGSHOP.msgBox.show('ERROR','Please check your email!');
		return false;
	}
	if(!checkEmail($("input[name='username']").val())){
		GGSHOP.msgBox.show('ERROR','Please check your Login Email!');
		return false;
	}
	var phone=$("input[name='phone']").val();
	if(phone==''){
		GGSHOP.msgBox.show('ERROR','Please check your phone!');
		return false;
	}
	commonEffection.setLoading();
	if (confirm('Your login email can not be modified，are you sure?')) {
		$('#buyerContactForm').submit();
	}
}
$(document).ready(
	function(){
		var sex="<?=$this->buyerArray[0]['sex']?>";
		sex=sex==''?'m':sex;
		$("input[type='radio']")[0].checked = false;
		$("input[value='"+sex+"']")[0].checked = true;
	}
);
</script>
<div class="fcj_menu">
        	<b class="spbg2 corner tl"></b>
    		<b class="spbg2 corner tr"></b>
    		<b class="spbg2 corner bl"></b>
    		<b class="spbg2 corner br"></b>
    		<div class="titlebar clearfix">My Account &gt; Contact</div>
    		<form name="buyerContactForm" id="buyerContactForm" action="adminb<?=CHOSING_DE?>info<?=CHOSING_DE?>docontact" method="post">
    		<table class="formt" width="500">
    			<tr>
    				<td width="30%" align="right"><span class="formt-title">*Login Email:</span></td>
    				<td><input type="text" name="username" onblur="checkinput(this.value)" class="text" value="<?=$this->buyerArray[0]['username']?>"<?php if (!empty($this->buyerArray[0]['username'])) {echo ' readonly="true" style="background-color:#e1e1e1"';}?>/></td>
    			</tr>
    			<tr>
    				<td align="right"><span class="formt-title">Nick name:</span></td>
    				<td><input type="text" name="nick_name" onblur="checkinput(this.value)" class="text" value="<?=$this->buyerArray[0]['nick_name']?>" /> </td>
    			</tr>
    			<tr>
    				<td align="right"><span class="formt-title">Contact name:</span></td>
    				<td><input type="text" name="contact_name" onblur="checkinput(this.value)" class="text" value="<?=$this->buyerArray[0]['contact_name']?>"/> <input type="radio" name="sex" id="sex" value="m" checked/><lable for="sex0">Mr.</lable> <input type="radio" name="sex" value="f" /><lable for="sex1">Ms.</lable></td>
    			</tr>
    			<tr>
    				<td align="right"><span class="formt-title">*Business email:</span></td>
    				<td><input type="text" name="email" onblur="checkinput(this.value)" maxlength=50 type="text" id="email" class="text" value="<?=$this->buyerArray[0]['email']?>" /></td>
    			</tr>
    			<tr>
    				<td align="right"><span class="formt-title">Skype:</span></td>
    				<td><input type="text" name="skype" onblur="checkinput(this.value)" maxlength=50 type="text" id="skype" class="text" value="<?=$this->buyerArray[0]['skype']?>" /></td>
    			</tr>
    			<tr>
    				<td align="right"><span class="formt-title">*Business Phone:</span></td>
    				<td><input type="text" name="phone" onblur="checkinput(this.value)" type="text" maxlength=100 id="phone" class="text" value="<?=$this->buyerArray[0]['phone']?>" /></td>
    			</tr>
    			<tr>
    				<td align="right"><span class="formt-title">Fax Number:</span></td>
    				<td><input type="text" name="fax" onblur="checkinput(this.value)" maxlength=20 type="text" id="fax" class="text" value="<?=$this->buyerArray[0]['fax']?>"/></td>
    			</tr>
    			<tr>
    				<td align="right"><span class="formt-title">Cell Phone:</span></td>
    				<td><input type="text" name="cell" onblur="checkinput(this.value)" maxlength=30 type="text" id="cell" class="text" value="<?=$this->buyerArray[0]['cell']?>" /></td>
    			</tr>
    			<tr>
    				<td align="center" colspan="2"><input type="button" value="Save" name="save" onclick="checkform();" class="subtn spbg2" /></td>
    			</tr>
    		</table>
    		</form>
        </div>